package me.zhengjie.modules.service.impl;

import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.domain.enterprise.EnterprisePersonnelInformation;
import me.zhengjie.modules.repository.enterprise.EnterprisePerMapper;
import me.zhengjie.modules.service.EnterprisePerService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service("EnterprisePerService")
@RequiredArgsConstructor
public class EnterprisePerServiceImpl implements EnterprisePerService {

    private final EnterprisePerMapper enterprisePerMapper;

    /**
     * 批量添加企业员工信息
     * @param list
     * @return
     */
    @Transactional
    @Override
    public int addPerByList(List<EnterprisePersonnelInformation> list) {
        return enterprisePerMapper.insertPerByList(list);
    }

    @Override
    public List<EnterprisePersonnelInformation> queryEnterprisePerByName(String name) {
        return enterprisePerMapper.selectEnterprisePerByName(name);
    }
}
